#ifndef THREAD_H_
#define THREAD_H_

#include <string>
#include "SDL/SDL_thread.h"

/*
 * Abstraction of a thread.
 */
class Thread
{
protected:
	Thread(const std::string & name);
public:
	virtual ~Thread();

private:
	SDL_Thread *thread;
	bool quit;
	std::string name;


public:
	virtual void init() = 0;
	virtual void run() = 0;
	virtual void shutDown() = 0;

	void start();
	void stop();
//	void kill();

	bool isRunning() const;
	bool isQuitting() const;
	const std::string & getName() const;
};


#endif /*THREAD_H_*/
